Transformation and aggregation engine

ABSTRACT

A system has a gateway cluster having a gateway processor for communication with an external processor of an external user using a first protocol and data format. A non-transitory storage medium is configured for storing a database containing unfilled orders associated with the external user. An application cluster has a processor in communication with the storage medium for accessing the database. The gateway processor can communicate with the application processor using a second protocol and data format different from the first protocol and data format. The application processor is configured for fetching and aggregating unfilled orders from the database, and transmitting an aggregation of orders to the external processor via the gateway cluster in response to a number of unfilled orders being at least a threshold number, a size of the aggregation of orders being at least a threshold size, or expiration of a predetermined time period.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation Application of, and claims priorityto, U.S. patent application Ser. No. 15/884,272, filed on Jan. 30, 2018,which is herein incorporated by reference in its entirety.

FIELD

This disclosure relates generally to computing networks, and morespecifically to computing networks interfacing with external systemsusing heterogeneous protocols.

BACKGROUND

Enterprise computer networked systems may have multiple integrationpoints for external systems and networks with which they communicate.For example, in a business environment, an enterprise may interact withthe networks of several customers, vendors and/or drop-ship vendors(DSV). These external networks may use a variety of heterogeneouscommunication protocols and data formats.

The external networks may be added on an ad hoc basis over time. As aresult, communications support hardware and software for each of theexternal networks may result in a complex architecture for theenterprise. Many legacy systems developed over time have limitedprocessing capacity and may not scale readily to support largertransaction volume.

SUMMARY

According to an aspect, a system comprises a first gateway clusterhaving a first gateway processor configured to communicate with a firstexternal processor of a first external user. The system also comprises anon-transitory machine readable storage medium configured for storing adatabase, as well as a first application cluster comprising a firstplurality of virtual machines and a second application clustercomprising a second plurality of virtual machines. The first applicationcluster is configured to receive a first message from the first gatewaycluster, and access a first set of rules for the first external userfrom the database. The first application cluster is also configured todetermine that a first trigger condition is satisfied based on the firstmessage and the first set of rules. Further, the first applicationcluster is configured to obtain a first lock from a lock manager inresponse to determining that the first trigger condition is satisfied.The first lock gives exclusive access to a first plurality of orders forthe first external user stored in the database to one of the firstapplication cluster and the second application cluster. The firstapplication cluster is also configured to aggregate the first pluralityof orders for the first external user based on obtaining the first lock.The first application cluster is also configured to transmit the firstplurality of orders to the first external processor via the firstgateway cluster.

According to another aspect, a method comprises: receiving a firstmessage from a first gateway cluster; accessing a first set of rules fora first external user from a database; determining that a first triggercondition is satisfied based on the first message and the first set ofrules; obtaining a first lock from a lock manager in response todetermining that the first trigger condition is satisfied, wherein thefirst lock gives exclusive access to a first plurality of orders for thefirst external user stored in the database to one of a first applicationcluster and a second application cluster; aggregating the firstplurality of orders for the first external user based on obtaining thefirst lock; and transmitting the first plurality of orders to the firstexternal processor via the first gateway cluster.

According to another aspect, a non-transitory, machine readable storagemedium is encoded with program instructions, wherein when a processorexecutes the programmed instructions, the processor performs the methodcomprising: receiving a first message from a first gateway cluster;accessing a first set of rules for a first external user from adatabase; determining that a first trigger condition is satisfied basedon the first message and the first set of rules; obtaining a first lockfrom a lock manager in response to determining that the first triggercondition is satisfied, wherein the first lock gives exclusive access toa first plurality of orders for the first external user stored in thedatabase to one of a first application cluster and a second applicationcluster; aggregating the first plurality of orders for the firstexternal user based on obtaining the first lock; and transmitting thefirst plurality of orders to the first external processor via the firstgateway cluster.

According to another aspect, a system comprises a gateway cluster havingat least one gateway processor configured for communication with atleast one external processor of a first external user using a firstcommunication protocol and a first data format. A non-transitory machinereadable storage medium is configured for storing a database containinga plurality of unfilled orders associated with the first external user.An application cluster has at least one application processor incommunication with the storage medium for accessing the database. The atleast one gateway processor is configured for communicating with the atleast one application processor using a second communication protocoland a second data format different from the first communication protocoland the first data format. The at least one application processor isconfigured for fetching and aggregating unfilled orders from thedatabase, and transmitting an aggregation of orders to the externalprocessor via the gateway cluster in response to a total number ofunfilled orders associated with the first external user being at least athreshold number, a size of the aggregation of orders being at least athreshold size, or expiration of a predetermined time period.

According to another aspect, a method comprises: receiving data from atleast one external processor of a first external user via a gatewaycluster having at least one gateway processor, the receiving using afirst communication protocol and a first data format between theexternal processor and the gateway cluster; fetching a plurality ofunfilled orders associated with the first external user from a database;aggregating the unfilled orders into a single file or message containingthe aggregation of orders; and transmitting the aggregation of orders tothe external processor via the gateway cluster in response to a totalnumber of unfilled orders associated with the first external user beingat least a threshold number, a size of the aggregation of orders beingat least a threshold size, or expiration of a predetermined time period.The transmitting includes communicating between the at least oneapplication processor and the gateway cluster using a secondcommunication protocol and a second data format different from the firstcommunication protocol and the first data format.

According to another aspect, a non-transitory, machine readable storagemedium is encoded with program instructions, wherein when a processorexecutes the programmed instructions, the processor performs the methodcomprising: receiving data from at least one external processor of afirst external user via a gateway cluster having at least one gatewayprocessor, the receiving using a first communication protocol and afirst data format between the external processor and the gatewaycluster; fetching a plurality of unfilled orders associated with thefirst external user from a database; aggregating the unfilled ordersinto a single file or message containing the aggregation of orders; andtransmitting the aggregation of orders to the external processor via thegateway cluster in response to a total number of unfilled ordersassociated with the first external user being at least a thresholdnumber, a size of the aggregation of orders being at least a thresholdsize, or expiration of a predetermined time period. The transmittingincludes communicating between the at least one application processorand the gateway cluster using a second communication protocol and asecond data format different from the first communication protocol andthe first data format.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an exemplary system including atransformation and aggregation engine.

FIG. 2A is a block diagram of a computer processor used to implementcomponents of the transformation and aggregation engine of FIG. 1.

FIG. 2B is a block diagram of the transformation and aggregation engineof FIG. 1.

FIG. 3 is a data flow diagram for a method of operating the system ofFIG. 2B.

FIG. 4 is a diagram showing transmission from the internal processor tothe external processor in a system according to FIG. 1.

FIG. 5 is a diagram showing transmission from the external processor tothe internal processor in a system according to FIG. 1.

DETAILED DESCRIPTION

This description of the exemplary embodiments is intended to be read inconnection with the accompanying drawings, which are to be consideredpart of the entire written description. In the description, relativeterms such as “lower,” “upper,” “horizontal,” “vertical,”, “above,”“below,” “up,” “down,” “top” and “bottom” as well as derivative thereof(e.g., “horizontally,” “downwardly,” “upwardly,” etc.) should beconstrued to refer to the orientation as then described or as shown inthe drawing under discussion. These relative terms are for convenienceof description and do not require that the apparatus be constructed oroperated in a particular orientation. Terms concerning attachments,coupling and the like, such as “connected” and “interconnected,” referto a relationship wherein structures are secured or attached to oneanother either directly or indirectly through intervening structures, aswell as both movable or rigid attachments or relationships, unlessexpressly described otherwise.

This disclosure provides a transformation and aggregation engine 110providing distributed enterprise integration services. Thetransformation and aggregation engine 110 can mediate between theenterprise's internal applications and heterogeneous external systemswhich communicate with a variety of protocols and data formats. Thetransformation and aggregation engine 110 enables integration at scalewith multi-tenancy capabilities. The architecture of system 100,including the transformation and aggregation engine 110 supportsintegration as a service for seamless on-boarding of affiliates (e.g.,customers and/or vendors). The system uses a metadata driven method tohandle a variety of data flows, without requiring hardware or protocolchanges to the external systems. The design supports configurable dataprocessing and communication capabilities, using both push and pullmodels of communication. The system can easily be extended to supportadditional protocols and protocol and platform upgrades.

FIG. 1 is a block diagram of an exemplary environment in which system100 can operate. The transformation and integration engine 110interfaces with a plurality of internal applications, such as inventorymanagement system (IMS) 130, transport management system (TMS) 140,order management system (OMS) 150 an online catalog 160 and a returnsmanagement system (RMS) 170. These are non-exclusive examples, andtransformation and aggregation engine 110 can support a variety of otherapplications.

Transformation and aggregation engine 110 interfaces with externalsystems and networks, such as Market place services 120 and drop-shipvendors (DSV)/fulfillment centers 130. These external systems andnetworks are referred to below interchangeably as “external processors.”A reference to an “external processor” herein can refer to a systemhaving one processor, plural processors, or a network of computers andother devices.

The transformation and aggregation engine 110 can support a variety ofstandard transmission protocols—file transfers, services, and messaging.For example, file transfer protocol (FTP), secure shell file transferprotocol (SFTP), hypertext transfer protocol (HTTP), secure HTTP(HTTPS), structured query language (SQL), and simple mail transferprotocol (SMTP). The transformation and aggregation engine 110 cansupport standard formats such as JavaScript Object Notation (JSON)human-readable scripts for transmitting data objects, extensible markuplanguage (XML), and numerous file types.

The transformation and aggregation engine 110 allows rule basedtransformations between various formats, and maps the data feed to orfrom each external affiliate. For example, the transformation andaggregation engine 110 contains rules for transformations between XML,JSON, electronic data interchange (EDI) for purchase orders andinvoices, flat files, and other formats.

The transformation and aggregation engine 110 is configured to handlelarge sized files (for example, 50 GB files). The ability to handlelarge files allows the transformation and aggregation engine 110 processlarge incoming files, and to aggregate smaller messages and files fortransmission to external systems operating in batch mode. For example,aggregation allows rule-based aggregation of messages to conform toexternal processor capacity. The aggregation capability handles anydesired number of heterogeneous feed transmission schedules fordifferent external processors.

FIG. 2A is a block diagram of an exemplary computing device 600, whichmay be used to implement gateway clusters 230 a, 230 b, applicationcluster 240 a, 204 b, database 260 a, 260 b, streaming server 270 a, 270b, object storage 281, internal client 290 and external processor 292(all described below with reference to FIG. 2B).

In some embodiments, computing device 600 includes a hardware unit 625and software 626. Software 626 can run on hardware unit 625 such thatvarious applications or programs can be executed on hardware unit 625 byway of software 626. In some embodiments, the functions of software 626can be implemented directly in hardware unit 625, e.g., as asystem-on-a-chip, firmware, field-programmable gate array (“FPGA”), etc.In some embodiments, hardware unit 625 includes one or more processors,such as processor 630. In some embodiments, processor 630 is anexecution unit, or “core,” on a microprocessor chip. In someembodiments, processor 630 may include a processing unit, such as,without limitation, an integrated circuit (“IC”), an ASIC, amicrocomputer, a programmable logic controller (“PLC”), a programmablegate array (PGA), and/or any other programmable circuit. Alternatively,processor 630 may include multiple processing units (e.g., in amulti-core configuration). The above examples are exemplary only, and,thus, are not intended to limit in any way the definition and/or meaningof the term “processor.”

Hardware unit 625 also includes a system memory 632 that is coupled toprocessor 630 via a system bus 634. Memory 632 can be a general volatileRAM. For example, hardware unit 625 can include a 32 bit microcomputerwith 2 Mbit ROM and 64 Kbit RAM, and/or a few GB of RAM. Memory 632 canalso be a ROM, a network interface (NIC), and/or other device(s).

In some embodiments, computing device 600 can also include at least onemedia output component or display interface 636 for use in presentinginformation to a user. Display interface 636 can be any componentcapable of conveying information to a user and may include, withoutlimitation, a display device (not shown) (e.g., a liquid crystal display(“LCD”), an organic light emitting diode (“OLED”) display, or an audiooutput device (e.g., a speaker or headphones)). In some embodiments,computing device 300 can output at least one desktop, such as desktop640. Desktop 640 can be an interactive user environment provided by anoperating system and/or applications running within computing device600, and can include at least one screen or display image, such asdisplay image 642. Desktop 640 can also accept input from a user in theform of device inputs, such as keyboard and mouse inputs. In someembodiments, desktop 640 can also accept simulated inputs, such assimulated keyboard and mouse inputs. In addition to user input and/oroutput, desktop 640 can send and receive device data, such as inputand/or output for a FLASH memory device local to the user, or to a localprinter.

In some embodiments, display image 642 can be presented to a user oncomputer displays of a remote terminal (not shown). For example,computing device 600 can be connected to one or more remote terminals(not shown) or servers (not shown) via a network (not shown), whereinthe network can be the Internet, a local area network (“LAN”), a widearea network (“WAN”), a personal area network (“PAN”), or anycombination thereof, and the network can transmit information betweencomputing device 300 and the remote terminals or the servers, such thatremote end users can access the information from computing device 600.

In some embodiments, computing device 600 includes an input or a userinterface 650 for receiving input from a user. User interface 650 mayinclude, for example, a keyboard, a pointing device, a mouse, a stylus,a touch sensitive panel (e.g., a touch pad or a touch screen), agyroscope, an accelerometer, a position detector, and/or an audio inputdevice. A single component, such as a touch screen, may function as bothan output device of the media output component and the input interface.In some embodiments, mobile devices, such as tablets, can be used.Computing device 600 can also include a web browser 655, such as“CHROME” from Google, LLC of Mountain View, Calif., “SAFARI” from AppleInc. of Cupertino, Calif., “FIREFOX” from Mozilla Foundation of MountainView, Calif., or the like. The web browser 655 (referred to below thebrowser) is a software application for retrieving, presenting andtraversing information resources on the World Wide Web or a web serverin a private network. The browser 655 can render content (e.g., images),audio, video, and XML files, and may have plug-ins to support Flashapplications and Java applets. An information resource is identified bya Uniform Resource Identifier (URI/URL) that may be a web page, image,video or other piece of content.

Computing device 600, in some embodiments, can include a database 660within memory 632, such that various information can be stored withindatabase 660. Alternatively, in some embodiments, database 660 can beincluded within a remote server (not shown) with file sharingcapabilities, such that database 660 can be accessed by computing device600 and/or remote end users. In some embodiments, a plurality ofcomputer-executable instructions can be stored in memory 632, such asone or more computer-readable storage media 670 (only one being shown inFIG. 2A). Computer storage medium 670 includes non-transitory media andmay include volatile and nonvolatile, removable and non-removablemediums implemented in any method or technology for storage ofinformation such as computer-readable instructions, data structures,program modules or other data.

FIG. 2B is a block diagram of an exemplary transformation andaggregation engine 110. The transformation and aggregation engine 110 isconfigured for elastic cloud deployment to scale capacity dynamically.Application clusters 240 a, 240 b are provided for servicing internalapplications (e.g., IMS 130, TMS 140, OMS 150, catalog 160 and RMS 170)and performing transformation and processing. Gateway clusters 230 a,230 b provide a store-and-forward function, receiving messages using anexternal protocol and forwarding the messages to the application clusterusing an internal protocol. Gateway clusters 230 a, 230 b can be hostedseparately from application clusters 240 a, 240 b allowing independentcapacity management and scaling. For example, instances of any or all ofthe internal applications can be added or removed dynamically withoutimpacting the configuration of any of the external systems 120, 130 orgateway clusters 230 a, 230 b. Although FIG. 2B shows two applicationclusters 240 a, 240 b and two gateway clusters 230 a, 230 b, this isconfiguration is only an example, the transformation and aggregationengine 110 can include any number of application clusters 240 a, 240 band any number of gateway clusters 230 a, 230 b.

The separation of application clusters 240 a, 240 b and gateway clusters230 a, 230 b and the availability of numerous protocol conversions andformat transformations allows for quick provisioning of new externalvendors. In some embodiments, format transformations are facilitated bytemplate-driven on-boarding.

In some embodiments, all the application servers are provisioned asclouds. The applications can share pools of configurable systemresources and higher-level services (e.g., virtual machines (VMs),servers, storage, load balancing, database management) that can berapidly provisioned with minimal management effort. Reference to a“processor” herein can refer to a VM or a “bare metal” processor runninga native operating system.

The architecture is horizontally scalable at each layer, allowing theadministrator to add or remove nodes of the system 100, such as adding anew computer for a distributed software application. An applicationcluster 240 a, 240 b can be scaled out from one Web server system to anydesired number to consistently support a desired quality of service(QoS), even as the number of users and external affiliates grows. Forexample, the transformation and aggregation engine 110 can be scaledfrom supporting 10,000 affiliates to 100,000 affiliates by addingservers, and an external affiliate can be provisioned.

As an integration platform, transformation and aggregation engine 110can run different applications on different VMs. Transformation andaggregation engine 110 has an inbuilt mechanism to optimally distributeapplications among available VMs, to effectively utilize thehardware/software resources. The transformation and aggregation engine110 uses rule templates that can be reused for any desired number ofaffiliates, ensuring consistency and reducing provisioning time. Forexample, five rule templates can support on-boarding of most externalsystem.

Each application cluster 240 a, 240 b has access to a distributeddatabase management system (DBMS) 260 a, 260 b configured to handlelarge amounts of data across a plurality of servers and/or a pluralityof data centers. The distributed nature of the transformation andaggregation engine 110 provides high availability. In some embodiments,the DBMS 260 a, 260 b provides asynchronous masterless replication,allowing any node to service any request. In some embodiments, thedatabase uses an object-based storage architecture as a file repository.allowing each object to contain payload data, a variable amount ofmetadata, and a globally unique identifier. In some embodiments, theDBMS 260 a, 260 b is a non-relational database, such as “CASSANDRA” fromApache Software Foundation of Forest Hill, Md.

In some embodiments, the object storage 281 (shown in FIG. 4) can use“OPENSTACK®” Object Storage “SWIFT” from the OpenStack Foundation ofAustin, Tex., a scalable redundant storage system. The object storage281 makes virtual servers and other resources available to clients tocontrol heterogeneous, multi-vendor hardware pools of processing,storage, and networking resources. In some embodiments, objects andfiles can be written to multiple drives in the data center. TheOpenStack software can ensure data replication and integrity across eachapplication cluster. Some embodiments use Swift to scale storageclusters horizontally by adding new servers. In response to a failure ofany storage drive, OpenStack replicates its content from other activenodes to new locations in the cluster.

In some embodiments, firewall management is virtual IP based. Thevirtual IP addresses are different from the shared firewall's “real” IPaddresses. The virtual IPs provide network address translation (NAT).Virtual IP enables load-balancing by distributing requests to a clusterof application virtual machines thus enabling high availability of theoverall system.

In some embodiments, a lock manager 250 maintains a system of locks andleader election. The lock manager 250 can maintain configurationinformation, naming, distributed synchronization, and group services. Asinternal request messages (e.g., purchase orders) are received frominternal users, the lock manager maintains locks on the database 260 a,260 b, allowing only one user at a time to store a record in thedatabase for inline aggregation of orders.

In some embodiments, the lock manager 250 selects one of the VMs to be aleader (and the remaining VMs are followers). For example, when a firstVM sends a request to lock manager 250 to make that VM the leader of allmessages relating to the same combination of external affiliate andmessage type, lock manager 250 makes that VM the leader. The remainingVMs become followers for that combination of external affiliate andmessage type, until the leader relinquishes the lock.

When the message listener 241 a, 241 b receives an internal message, themessage is saved to persistent storage and is sent to via SFTP transportto the fulfillment centers. The lock is released in zookeeper DB. Insome embodiments, the lock manager 250 can acquire locks on both thefulfillment center or fulfiller (via which the order is fulfilled, whereeach fulfiller is represented by an ID in the system) and message typecombination. When an application acquires the locks from the lockmanager 250, the application starts aggregating the records. In someembodiments, the lock manager 250 is “ZOOKEEPER” from the ApacheSoftware Foundation, Wakefield, Mass. After records are aggregated, therecords are stored in a persistent file, which is sent to via SFTPtransport to the fulfillment centers. The lock is released in zookeeperDB.

The lock manager 250 also provides a “heart beat” mechanism that allowslock manager 250 to detect the failures of the leader VM, and elects anew leader, if the leader is down. The lock manager 250 periodicallypolls each VM. If the lock manager 250 does not receive any responsefrom a VM, the lock manager 250 assumes that VM is down. The lockmanager 250 appoints a new leader VM for handling the next transaction.

The transformation and aggregation engine 110 uses a streaming server270 a, 270 b as a “distributed commit log” or “distributing streamingplatform.” The streaming server 270 a, 270 b acts as a database commitlog to provide a persistent record of all transactions (e.g., orders andreturns) so they can be replayed to rebuild the state of thetransformation and aggregation engine 110. In some embodiments, data arestored within streaming server 270 a, 270 b, in order, and can be readdeterministically. The streaming server 270 a, 270 b can be distributedwithin the transformation and aggregation engine 110 to provideadditional protections against failures, and provide scalingperformance. The streaming server 270 a, 270 b should be ahigh-throughput, low-latency platform for handling real-time data feeds.In some embodiments, the streaming server 270 a, 270 b can beimplemented using Apache “KAFKA” from the Apache Software Foundation,Wakefield, Mass. In some embodiments, a respective separate Kafka topicis used for each respective external (vendor or DSV) processor. In someembodiments, streaming server 270 a, 270 b also serves as the internalmessaging system of transformation and aggregation engine 110.

The transformation and aggregation engine 110 has a search server 212 a,212 b. The transformation and aggregation engine 110 is event driven.Internal events may be generated at periodic intervals. Thetransformation and aggregation engine 110 can use the search server 212a, 212 b to check whether a file has been received or sent. In someembodiments, documents are indexed in search server 212 a, 212 b overHTTP, via formats such as JSON, XML, a table of comma-separated values(CSV), or binary. In some embodiments, the applications can query searchserver 212 a, 212 b via HTTP GET, and receive JSON, XML, CSV or binaryresults. For example, in some embodiments, the search server 212 a, 212b can comprise Apache “SOLR™” from the Apache Software Foundation,Wakefield, Mass.

In some embodiments, the search server 212 a, 212 b provides an inbuiltalerting and monitoring system. For example, assume a file is scheduledto arrive from an external affiliate by 9 AM but did not arrive. Eventscan be generated in a given interval and the search server 212 a, 212 bcan check whether the file has been received or sent. If the searchcriteria matches, the file has been received or sent. The alerting andmonitoring system can be integrated with an internal/external monitoringsystems using a tool such as “SLACK” (“Searchable Log of AllConversation and Knowledge”) from Slack Technologies of Vancouver,British Columbia. Alternatively, or an email program.

A services cluster 210 provides administrative services and toolsincluding an administrator dashboard, maintenance window viewer,maintenance schedule editor, and report generator.

A surface user interface 210 provides internal users and theadministrator with graphical input windows and standardized output andreport displays.

Each tenant can have one or more application cluster 240 a, 240 b. Eachapplication cluster 240 a, 240 b has a respective message listener 241a, 241 b. Once an external user (affiliate) is on-boarded, the messagelistener 241 a, 241 b listens for changes in the database 260 a, 260 b,which generate and event. In some embodiments, the events can betime-based (i.e., passage of a predetermined interval) orcondition-based (e.g., collection of a predetermined number of orders,accumulation of an order in a file of a threshold size. The eventgeneration can use a sliding window. For example, in some embodiments, aclock (not shown) which triggers an event (upon expiration of athreshold period) can be reset, when a condition-based event istriggered. In response to generation of an event, the message listener241 a, 241 b initiates an aggregation and transmission process. Theaggregation trigger frequency is controlled by a time-request lengthwindow based flow controller configured by the profile from the externalaffiliate during on-boarding.

Each application cluster 240 a, 240 b has a respective universalprocessing engine (UPE) 242 a, 242 b. UPE 242 a, 242 b. UPE 242 a, 242 bperforms application processing flows on incoming messages. UPE 242 a,242 b can perform protocol conversion, file splitting, and messageaggregating. For example, UPE 242 a, 242 b can perform protocolconversions, or split a large file into smaller chunks. UPE 242 a, 242 bcan provide a user searching, viewing capacity, and an interface to thedata stores in database 260 a, 260 b. UPE 242 a, 242 b performsaggregation and event triggering within each respective applicationcluster 240 a, 240 b. When file is ready, hand off to gateway layer andgateway layer sends to partner.

The UPE 242 a, 242 b handles different file formats The transformationand aggregation engine 110 is configured to supports a variety ofindustry standard file formats (such as .XML, .EDI, .JSON, and .WFF, forexample). The transformation and aggregation engine 110 maintains aconsistent way of transforming the files irrespective of the dataformat. For example, the UPE 242 a, 242 b of transformation andaggregation engine 110 can use custom widgets of smooks for alltransformations, so that the result of the transformation is alwaysconsistent, irrespective of inbound and outbound file formats.

Each application cluster 240 a, 240 b has a respective is complex eventprocessing (CEP) module 244 a, 244 b. CEP module 244 a, 244 b storesindividual affiliates' rules and applies rules-based order messagetransmission to individual affiliates. There can be many externalaffiliates (e.g., vendors and DSVs) in the distributed system 100 (e.g.,1,000 external affiliates). CEP module 244 a, 244 b can maintain andapply each rule set up by a respective vendor or DSV.

For instance, for a given facility the time-request length window can beconfigured as {“duration”: “2 min”, “message_count”: “100”,“process_type”: “OrderRequest” “partnerId”: “6559”}. This would beinterpreted by the transformation and aggregation engine 110 toaggregate all OrderRequest messages for partner 6559 arriving in the 2min window for a max event length of 100.

A second vendor may be configured to receive not more than 200 orders in3 minutes. The transformation and aggregation engine 110 is configuredto transmit aggregated orders to the first and second vendors usingdifferently sized aggregated orders with different file size ondifferent (and overlapping) schedules. This is only a simplifiedexample. CEP module 244 a, 244 b can initiate translation andaggregation of orders for each external affiliate according to its ownindividual schedule based on these rules. In some embodiments, the CEPmodule 244 a, 244 b can initiate transformation and aggregation oforders for thousands of affiliates, with schedules that can overlap intime.

CEP module 244 a, 244 b generates the events that trigger processing byUPE 242 a, 242 b. The type of triggering event is configurable based oneach vendor's/DSV's specifications, as input to the transformation andaggregation engine 110 during on-boarding. CEP module 244 a, 244 b andUPE 242 a, 242 b handle batching and timing at the application level.Thus, configuration of the transformation and aggregation engine 110 canbe performed easily during on-boarding by having the user interface withthe surface user interface 210 to identify parameters regarding format,frequency, volume and interval constraints, and communication protocol.After on-boarding, CEP module 244 a, 244 b generates and transmits theevents for each affiliate to UPE 242 a, 242 b. Upon receiving each eventnotification, UPE 242 a, 242 b transforms the corresponding aggregatedorder to the individual format expected by each respective affiliate.Batches are created using rules to cover flow control. The rules canspecify how to process requests in a controlled process using a timewindow-sliding window. E.g., a rule may specify that a batch containingup to 100 messages can be processed within any 2 minute window. Therequests are processed and delivered to UPE.

Each application cluster 240 a, 240 b has a respective router 243 a, 243b for handling the communication with distributed internal users andcustomers.

Each gateway cluster 230 a, 230 b has a transport server 232 a, 232 b, acleaning utility 231 a, 231 b, a webserver 233 a, 233 b, and an SFTPserver 234 a, 234 b. The cleaning utility 231 a can remove temporaryfiles and duplicate files that may accumulate during operation. In someembodiments the cleaning utility is a file sweeper 231 a, 231 b. When afile is dropped from the external affiliate to the gateway transportserver 232 a, 232 b, the file sweeper 231 a, 231 b sweeps the file(e.g., for malware), stores the file in object storage 281, creates ametadata object with reference to object storage 281, and deletes thefile from the gateway transport server 232 a, 232 b. Thus, the VMs arenot exhausted by large files, as the files are deleted immediately afterstorage in object store 281. Subsequently, other processes can accessthe file directly from object storage 281 (e.g., as when the system hasreference to the file). This allows other processes to process data fromthe file in parallel.

The transport server 232 a, 232 b handles connection-orientedcommunication, reliability, flow control, and multiplexing with externalcomputers using any of a variety of protocols. In some embodiments,transport server 232 a, 232 b is configured for connection-orientedcommunication with external networks using transmission control protocol(TCP), Datagram Congestion Control Protocol (DCCP) or the Stream ControlTransmission Protocol (SCTP) at the transport layer.

The webserver 233 a. 233 b provides HTTP communications between thewebserver 233 a. 233 b and external affiliates' computers. HTTP is oneof the protocols via which partners/distributors can integrate with thesystem. In some embodiments, the external computer transmits a pull-typerequest for a batch of orders to webserver 233 a. 233 b using an HTTPrequest, and the application cluster 240 a, 240 b sends the file by HTTPresponse.

The SFTP server 234 a, 234 b transmits files to the SFTP clients 280 a,280 b and external networks by secure shell FTP, using both push andpull models of communication. The transformation and aggregation engine110 can also function as a virtual SFTP server in a Partner-FilePull-mode. Transformation and aggregation engine 110 provides a virtualSFTP, such that clients can reach to any one of underlying virtualmachines via VIP address. This virtual SFTP method is scalable model incloud environments.

In some embodiments, the lock manager 250, DBMS 260 a, 260 b, streamingserver 270 a, 270 b, and search server 212 a, 212 b and widgets areloosely coupled, allowing individual updating and/or replacement.

FIG. 3 is a diagram showing an example of a control flow in thetransformation and aggregation engine 110.

At data flow 1, the services cluster 210 of the transformation andaggregation engine 110 receives the details from the user inputs andinserts the affiliate's profile into its tables. The details can includesource/destination SFTP/HTTP end points and transformation rules. Indata flow 1, an external business user undergoes the self on-boardingusing a set of input templates. Any new department, facility or businessentity can use self on-boarding feature obtain an account. In someembodiments, the user interface 220 of the transformation andaggregation engine 110 dynamically renders screens that allow the userto onboard, providing different flows for order management, inventorymanagement, returns management etc. For example, the user can input theaffiliate ID, name, templates, categories, and the like. A template canprovide business flows that are mapped to business categories to whichthe user responded. The on-boarding process inputsbusiness/operations/device constructs (e.g., using XML). Like web pageon service. The services cluster 210 receives and uploads theaffiliate's information to the transformation and aggregation engine110.

The onboarding process supports multi-tenancy. A two internal tenantsystem may include a first tenant comprising gateway cluster 230 a andapplication cluster 240 a, and a second tenant comprising gatewaycluster 230 b and application cluster 240 b. Each tenant can correspondto a respectively different business unit (e.g., WalMart and Sam'sClub). In some embodiments, all the external affiliate configurationsare categorized as either: (1) common-configuration, or (2) tenantspecific. An external affiliate having a common configuration uses thesame parameters for communication with both tenants. An externalaffiliate having a tenant-specific configuration uses a different set ofconfiguration parameters for communication with each tenant.

Common configurations override Tenant specific configurations. As thisplatform is configuration driven, it is capable of enabling multitenantconfigurations. For example, the system can allow Sam's and Walmart.comto run as two multiple tenants.

In data flow 2, order management sends orders to transformation andaggregation engine 110 via Kafka topic. The work flows are committed tothe rules database 260 a, 260 b.

In data flow 3, once a new user is on-boarded, the message listener 241a listens for messages indicating changes (e.g., incoming orders oroutgoing returns from internal users) that involve the on-boardedaffiliate. The events indicate that sufficient data have beenaccumulated to process inbound and outbound files. Upon receiving aninterrupt indicating that the event occurred, the message listener 241 anotifies the database 260 a. When inbound/outbound files arrive,transformation and aggregation engine 110 automatically maps to theconfiguration in DB and process them.

In data flow 4, the message listener 241 a continues to listen formessages (e.g., orders) from internal users. As and when each messagearrives, it is stored in in the database in persistent storage. (e.g., a“CASSANDRA” database).

In data flow 5, the message listener 241 a sends an interrupt to CEPmodule 244 a, 244 b and provides updated metadata related to thereceived message to the CEP module 244 a, 244 b. As there are multipleunderlying virtual machines in each application cluster 240 a, 240 b, itis desirable to make the data available to any one of the virtualmachines, since a client request can land in any one of the virtualmachines. Thus, transformation and aggregation engine 110 incorporatesan SFTP server, which can virtually serve the requests by fetching therequested metadata from the database 260 a, 260 b and stream the filesfrom object storage 281 directly.

In data flow 6, in response to the received interrupt, the CEP module244 a, 244 b follows the affiliate specific rules by generating andtransmitting an event to UPE 242 a, 242 b indicating that a triggercondition (e.g., sufficient number of orders, sufficient order size, orpassage of a predetermined time interval) has occurred.

At data flow 7, UPE 242 a, 242 b in one of the clusters 240 a, 240 brequests and obtains the lock from the lock manager 250. Only one threadcan acquire a lock for a given combination of affiliate (e.g.,distributor, vendor, or DSV) and message type (order or return), whichhelps preserve the chronological order processing sequence for a givenaffiliate. For each transaction (order or return), only one lock isgranted at a time. This prevents two clusters or two virtual machinesfrom committing the same transaction to the database 260 a, 260 b twice.Once one of the UPEs 242 a, 242 b acquires the lock (from the lockmanager 250) that UPE begins aggregate messages for thatdistributor/message type combination and starts aggregating the records.

At dataflow 8, UPE 242 a, 242 b fetches a batch of orders (in accordancewith different batching/time windows, as specified in the user profiledata collected during on-boarding) from the database 260 a, 260 b. Inone example, partner 1 (an affiliate) can take only 100 records in afile and 20 files in in an hour. Rules are dynamically fetched from thedatabase 260 a, 260 b and processed in runtime, enabling (individualuser) a configuration driven, zero-deployment-delay approach. The timewindows for heterogeneous users can be interleaved without anyadditional deployment time. Orders for each combination of externalaffiliate (external processor) and message type are processedconcurrently.

At dataflow 9, UPE 242 a, 242 b generates an aggregated order filecontaining the corresponding number of records (e.g., 100 records), anduploads the file to object storage 281 (e.g., “SWIFT”).

At dataflow 10, UPE 242 a, 242 b generates a notice indicating that theaggregated order file is ready for transmission and sends a notificationto the SFTP server 234 a, 234 b or the webserver 233 a, 233 b in thegateway cluster 230 a, 230 b.

At dataflow 11, the SFTP server 234 a, 234 b or the webserver 233 a, 233b in the gateway cluster 230 a, 230 b fetches the aggregated order filefrom the object storage 281. After the records are aggregated, it isstored in a persistent file and is sent via SFTP server 234 a, 234 b tothe external affiliates (e.g., fulfillment centers). The lock isreleased in zookeeper DB.

At dataflow 12, the SFTP server 234 a, 234 b or the webserver 233 a, 233b in the gateway cluster 230 a, 230 b transmits the aggregated order tothe external affiliate (vendor or DSV) via SFTP or HTTP, respectively.In other embodiments, the application cluster can transmit the datausing an SQL loader or another queueing mechanism.

The transformation and aggregation engine 110 is scalable. For example,if external Partner A transfers a 50 GB file, the transformation andaggregation engine 110 uploads the file to object storage 281 and keepsa reference. The transformation and aggregation engine 110 sendsnotification to external Partner B, and Partner B can download the filevia transformation and aggregation engine 110's SFTP/HTTP end point. Thetransformation and aggregation engine 110 streams the file directly fromobject storage 281 to Partner B. This allows to scale to process anysized file.

At dataflow 13, the external affiliate sends a status, acknowledgingreceipt, and updates the file “ORDER STATUS FILEs” sent by thedistributor confirming fulfillment of order to the SFTP server 234 a,234 b or the webserver 233 a, 233 b in the gateway cluster 230 a, 230 bupdates the file in the object storage 281.

At dataflow 14, the SFTP server 234 a, 234 b or the webserver 233 a, 233b in the gateway cluster 230 a, 230 b notifies UPE 242 a, 242 b.

At dataflow 15, UPE 242 a, 242 b fetches the configuration data from thedatabase 260 a, 260 b, as defined by the external affiliate duringon-boarding.

At dataflow 16, the database 260 a, 260 b provides updates to the OMS150 (FIG. 1), confirming the order status.

The transformation and aggregation engine 110 described herein can spawnmultiple processes for different applications and/or processes (such asIMS 130, TMS 140, OMS 150, catalog 160, and RMS 170) and/or threads. Anew application, process or thread can be spawned on-the-fly, while thetransformation and aggregation engine 110 is operating, and withouttaking the system offline. Each process is independent does not affectother flows. The transformation and aggregation engine 110 can continuetransforming and aggregating orders for other affiliates, whileon-boarding a new affiliate. The configuration of each application isdriven by the external processor's configuration. The number of threadsin each process is also configuration driven. Each process can beconfigured independently with rules based on the parameters input duringon-boarding.

The transformation and aggregation engine 110 is a highly decoupledplatform. Any cluster can be added or removed without disturbingoperation of the remaining clusters.

FIG. 4 is a diagram showing the flows from an internal client 290 of asingle application cluster 240 a to a single external user 292.

At data flow 1, the internal users 290 issue orders to the applicationcluster 240 a. At data flow 2, UPE 242 a stores the metadata for theorders to the database 260 a. In data flow 3, the application cluster240 a requests the lock from the lock manager 250 and receives the lock.In data flow 4, UPE 242 aggregates the orders and stores the aggregatedorder to the object storage 281. In data flow 5, the transformedaggregated order is sent to the streaming server 212 a. In data flow 6,the streaming server 212 a transmits the transformed aggregated order tothe gateway cluster 230 a in response to an HTTP pull request. In dataflow 7, the gateway cluster 230 a fetches the metadata for theaggregated order directly from the database 260. In data flow 8, theaggregated order file can be downloaded from the object storage 281. Indata flow 9, the external processor 292 can download the aggregatedorder file from the SFTP server 234 a, via SFTP.

FIG. 5 is a diagram showing the flows from a single external user 292 toan internal client 290 of a single application cluster 240 a.

At data flow 1, the internal users 290 issue orders to the applicationcluster 240 a. In data flow 3, the application cluster 240 a requeststhe lock from the lock manager 250 and receives the lock.

In data flow 1, the external processor 292 uploads an aggregated returnfile to the SFTP server 234 a, via SFTP. In data flow 2, the aggregatedreturn file can be stored in the object storage 281. In data flow 3, thegateway cluster 230 a stores the metadata for the aggregated return filein the database 260 a. In data flow 4, aggregated return is transmittedfrom the gateway cluster 230 a to the streaming server 212 a. In dataflow 5, the aggregated order is sent from the streaming server 212 a tothe application cluster 230 a. In data flow 6, UPE 242 a fetches themetadata for the individual orders from the database 260 a. In data flow7, UPE 242 obtains a lock from lock manager 250, receives the aggregatedorder from the object storage 281 and uses the metadata from database260 a to separate the orders in the aggregated order file and transformthe data to the internal format.

The system can be implemented in a variety of embodiments. In someembodiments, the system 100 includes a gateway cluster 230 a having atleast one gateway processor 232 a configured for communication with atleast one external processor 292 of a first external user using a firstcommunication protocol and a first data format. A non-transitory machinereadable storage medium 260 a is configured for storing a databasecontaining a plurality of unfilled orders associated with the firstexternal user. An application cluster 240 a has at least one applicationprocessor in communication with the storage medium 260 a for accessingthe database, the at least one gateway processor 230 a configured forcommunicating with the at least one application processor 240 a using asecond communication protocol and a second data format different fromthe first communication protocol and the first data format. The at leastone application processor 240 a is configured for fetching andaggregating unfilled orders from the database 260 a, and transmitting anaggregation of orders to the external processor via the gateway cluster230 a, in response to a total number of unfilled orders associated withthe first first external user being at least a threshold number, a sizeof the aggregation of orders being at least a threshold size, orexpiration of a predetermined time period.

In some embodiments, the at least one application processor 240 acomprises a first virtual machine and a second virtual machine. Thesystem has a lock manager 250 coupled to each of the first and secondvirtual machines. The lock manager 250 is capable of giving one of thefirst and second virtual machines a first lock for obtaining exclusiveaccess to form an aggregation of orders for the first external processor292 and transmit the aggregation of orders to the external processor 292via the gateway cluster 230 a.

In some embodiments, the first and second virtual machines areconfigured for requesting the first lock from the lock manager 250,generating an aggregation of order in response to receiving the firstlock; and releasing the first lock after transmitting the aggregation oforders.

In some embodiments, the database 260 a further stores a plurality ofunfilled orders associated with a second vendor having a second externalprocessor. The lock manager 250 is configured for providing a secondlock to one of the first and second virtual machines while one of thefirst and second virtual machines has the first lock. The second lock isprovided for obtaining exclusive access to form an aggregation of ordersfor the second vendor and transmit the aggregation of orders to thesecond external processor via the gateway cluster.

The first virtual machine is configured to exclude from the aggregationof orders an additional order that is added to the database while thefirst virtual machine has the lock.

The system can further include a streaming server 270 a for fetching ametadata from the database 260 a and streaming the aggregation of ordersfrom an object storage to the gateway cluster 230 a for delivery to thefirst external processor 292. Each virtual machine in the at least oneapplication processor 240 a is configured for initiating the streaming.

The gateway cluster 230 a further comprises at least one secure filetransfer server 234 a coupled to the streaming server for transmittingthe aggregation of orders to the first external processor 292.

The at least one application processor comprises a first applicationprocessor 240 a and a second application processor 240 b. The lockmanager 250 is coupled to each of the first and second applicationprocessors 240 a, 240 b. The lock manager 250 is capable of giving oneof the first and second application processors 240 a, 240 b a lock forobtaining exclusive access to form an aggregation of orders and transmitthe aggregation of orders to the external processor 292 via the gatewaycluster 230 a.

The first and second application processors 240 a, 240 b are configuredfor requesting the lock from the lock manager 250, generating anaggregation of order in response to receiving the lock, releasing thelock after transmitting the aggregation of orders.

The at least one application processor 240 a is configured for servingdisplays to request on-boarding information from the external processor292, receiving the onboarding information from the external processor292, and storing profile information in the database 260 a regardingrules for transmitting the aggregation of orders to the externalprocessor 292.

The transformation and aggregation systems described herein provideadvantages to internal systems. The transformation and aggregationsystems maps data to the internal application systems' preferredinterfaces. The transformation and aggregation systems can scale to meetperformance requirements. To external affiliates, the transformation andaggregation systems offers both file protocol and web servicesinterfaces. The transformation and aggregation system aggregates andtransforms records into batches, can handle complex mappingrequirements, can be customized to handle any data transmissionfrequency, output sizing, and/or proprietary formats.

The methods and system described herein may be at least partiallyembodied in the form of computer-implemented processes and apparatus forpracticing those processes. The disclosed methods may also be at leastpartially embodied in the form of tangible, non-transitory machinereadable storage media encoded with computer program code. The media mayinclude, for example, RAMs, ROMs, CD-ROMs, DVD-ROMs, BD-ROMs, hard diskdrives, flash memories, or any other non-transitory machine-readablestorage medium, wherein, when the computer program code is loaded intoand executed by a computer, the computer becomes an apparatus forpracticing the method. The methods may also be at least partiallyembodied in the form of a computer into which computer program code isloaded and/or executed, such that, the computer becomes a specialpurpose computer for practicing the methods. When implemented on ageneral-purpose processor, the computer program code segments configurethe processor to create specific logic circuits. The methods mayalternatively be at least partially embodied in a digital signalprocessor formed of application specific integrated circuits forperforming the methods.

Although the subject matter has been described in terms of exemplaryembodiments, it is not limited thereto. Rather, the appended claimsshould be construed broadly, to include other variants and embodiments,which may be made by those skilled in the art.

What is claimed is:
 1. A system comprising: a first gateway clusterhaving a first gateway processor configured to communicate with a firstexternal processor of a first external user; a non-transitory machinereadable storage medium configured for storing a database; a firstapplication cluster comprising a first plurality of virtual machines anda second application cluster comprising a second plurality of virtualmachines, wherein the first application cluster is configured to:receive a first message from the first gateway cluster; access a firstset of rules for the first external user from the database; determinethat a first trigger condition is satisfied based on the first messageand the first set of rules; obtain a first lock from a lock manager inresponse to determining that the first trigger condition is satisfied,wherein the first lock gives exclusive access to a first plurality oforders for the first external user stored in the database to one of thefirst application cluster and the second application cluster; aggregatethe first plurality of orders for the first external user based onobtaining the first lock; and transmit the first plurality of orders tothe first external processor via the first gateway cluster.
 2. Thesystem of claim 1, wherein obtaining the first lock from the lockmanager comprises: requesting the first lock from the lock manager;receiving the first lock from the lock manager in response to therequest, wherein the first plurality of orders are aggregated inresponse to receiving the lock; and releasing the first lock aftertransmitting the aggregation of orders.
 3. The system of claim 2,wherein the first message is received from a first affiliate of aplurality of affiliates, and wherein the first lock corresponds to thefirst affiliate.
 4. The system of claim 2 comprising a second gatewaycluster having a second gateway processor configured to communicate withthe first external processor of the first external user, wherein thesecond application cluster is configured to: receive a second messagefrom the second gateway cluster; access a second set of rules for thefirst external user from the database; determine that a second triggercondition is satisfied based on the second message and the second set ofrules; and request the first lock from the lock manager, wherein thelock manager is configured to deny the request when the first lock hasbeen received and not released by the first application cluster.
 5. Thesystem of claim 1 wherein the second application cluster is configuredto obtain the first lock from the lock manager after the firstapplication cluster releases the first lock.
 6. The system of claim 1,wherein the first lock is obtained by one of the first plurality ofvirtual machines.
 7. The system of claim 1 comprising a second gatewaycluster having a second gateway processor configured to communicate witha second external processor of a second external user, wherein a thirdapplication cluster having a third plurality of virtual machines isconfigured to: receive a second message from the second gateway cluster;access a second set of rules for the second external user from thedatabase; determine that a second trigger condition is satisfied basedon the second message and the second set of rules; obtain a second lockfrom the lock manager in response to determining that the second triggercondition is satisfied, wherein the second lock gives exclusive accessto a second plurality of orders for the second external user stored inthe database to the third application cluster; aggregate the secondplurality of orders for the second external user based on obtaining thesecond lock; and transmit the second plurality of orders to the secondexternal processor via the second gateway cluster.
 8. The system ofclaim 1, wherein a first of the first plurality of virtual machines ofthe first application cluster is configured to transmit a response tothe lock manager in response to being polled by the lock manager.
 9. Thesystem of claim 1 wherein the first application cluster is configured toexclude from the aggregation of the first plurality of orders anadditional order that is added to the database while the firstapplication cluster has the first lock.
 10. The system of claim 1wherein the gateway cluster further comprises at least one secure filetransfer server coupled to a streaming server for transmitting theaggregation of the first plurality of orders to the first externalprocessor.
 11. A method comprising: receiving a first message from afirst gateway cluster; accessing a first set of rules for a firstexternal user from a database; determining that a first triggercondition is satisfied based on the first message and the first set ofrules; obtaining a first lock from a lock manager in response todetermining that the first trigger condition is satisfied, wherein thefirst lock gives exclusive access to a first plurality of orders for thefirst external user stored in the database to one of a first applicationcluster and a second application cluster; aggregating the firstplurality of orders for the first external user based on obtaining thefirst lock; and transmitting the first plurality of orders to the firstexternal processor via the first gateway cluster.
 12. The method ofclaim 11 wherein obtaining the first lock from the lock managercomprises: requesting the first lock from the lock manager; receivingthe first lock from the lock manager in response to the request, whereinthe first plurality of orders are aggregated in response to receivingthe lock; and releasing the first lock after transmitting theaggregation of orders.
 13. The method of claim 12 comprising: receivinga second message from a second gateway cluster; accessing a second setof rules for the first external user from the database; determining thata second trigger condition is satisfied based on the second message andthe second set of rules; and requesting the first lock from the lockmanager, wherein the lock manager is configured to deny the request whenthe first lock has been received and not released by the firstapplication cluster.
 14. The method of 11 comprising transmitting aresponse to the lock manager in response to being polled by the lockmanager.
 15. The method of claim 11 comprising: receiving a secondmessage from a second gateway cluster; accessing a second set of rulesfor a second external user from the database; determining that a secondtrigger condition is satisfied based on the second message and thesecond set of rules; obtaining a second lock from the lock manager inresponse to determining that the second trigger condition is satisfied,wherein the second lock gives exclusive access to a second plurality oforders for the second external user stored in the database to a thirdapplication cluster; aggregating the second plurality of orders for thesecond external user based on obtaining the second lock; andtransmitting the second plurality of orders to the second externalprocessor via the second gateway cluster.
 16. A non-transitory, machinereadable storage medium encoded with program instructions, wherein whena processor executes the programmed instructions, the processor performsthe method comprising: receiving a first message from a first gatewaycluster; accessing a first set of rules for a first external user from adatabase; determining that a first trigger condition is satisfied basedon the first message and the first set of rules; obtaining a first lockfrom a lock manager in response to determining that the first triggercondition is satisfied, wherein the first lock gives exclusive access toa first plurality of orders for the first external user stored in thedatabase to one of a first application cluster and a second applicationcluster; aggregating the first plurality of orders for the firstexternal user based on obtaining the first lock; and transmitting thefirst plurality of orders to the first external processor via the firstgateway cluster.
 17. The non-transitory, machine readable storage mediumof claim 16, wherein the program instructions further configure theprocessor for: requesting the first lock from the lock manager;receiving the first lock from the lock manager in response to therequest, wherein the first plurality of orders are aggregated inresponse to receiving the lock; and releasing the first lock aftertransmitting the aggregation of orders.
 18. The non-transitory, machinereadable storage medium of claim 17, wherein the program instructionsfurther configure the processor for: receiving a second message from asecond gateway cluster; accessing a second set of rules for the firstexternal user from the database; determining that a second triggercondition is satisfied based on the second message and the second set ofrules; and requesting the first lock from the lock manager, wherein thelock manager is configured to deny the request when the first lock hasbeen received and not released by the first application cluster.
 19. Thenon-transitory, machine readable storage medium of claim 16, wherein theprogram instructions further configure the processor for transmitting aresponse to the lock manager in response to being polled by the lockmanager.
 20. The non-transitory, machine readable storage medium ofclaim 16, wherein the program instructions further configure theprocessor for: receiving a second message from a second gateway cluster;accessing a second set of rules for a second external user from thedatabase; determining that a second trigger condition is satisfied basedon the second message and the second set of rules; obtaining a secondlock from the lock manager in response to determining that the secondtrigger condition is satisfied, wherein the second lock gives exclusiveaccess to a second plurality of orders for the second external userstored in the database to a third application cluster; aggregating thesecond plurality of orders for the second external user based onobtaining the second lock; and transmitting the second plurality oforders to the second external processor via the second gateway cluster.